<template>
    <h2>listdemo</h2>
    <p v-for="item in games">{{ item }}</p>
    <p v-for="(item, index) in games" :key="index">{{ item }}:{{ index }}</p>
    <p v-for="item of games">{{ item }}</p>
    <p v-for="(item, index) of games" :key="index">{{ item }}:{{ index }}</p>
    <p :key="key" v-for="(item, key, index) of userinfo">{{ item }}:{{ key }}:{{ index }}</p>
</template>
<script>
export default {
    data() {
        return {
            games: ['lol', 'dota2', 'cs2', '地下城m', 'lolm'],
            userinfo: {
                name: 'gg',
                age: 20,
                sex: '男',
            },

        }
    }
}
</script>